<?php
class Block_Admin_Header_Toplink
    extends Block_Core_Text
{
    protected $_user = null;

    public function getUser()
    {
        if(!isset($this->_user)) {
            $session = new Model_Admin_Session();
            $this->_user = $session->getUser();
        }
        return $this->_user;
    }

    public function getFullUserName()
    {
        $name = $this->getUser()->getFirstname().' '.$this->getUser()->getLastname();
        return $name;
    }

    public function getUserUrl()
    {
        return $this->getUrl('admin/user/view/item/'.$this->getUser()->getId());
    }
}